package com.lotusfall.api;


import com.github.pagehelper.PageInfo;
import com.lotusfall.pojo.Ad;
import com.lotusfall.pojo.Comment;
import com.lotusfall.AdService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService(version = "1.0")
public class ApiAdServiceImpl implements ApiAdService {
    @Autowired
    private AdService adService;

    @Override
    public PageInfo<Ad> queryAdList(Integer type, Integer page, Integer pageSize) {
        Ad ad = new Ad();
        ad.setType(type);
        return this.adService.queryAdList(ad,page,pageSize);
    }

    @Override
    public PageInfo<Comment> queryCommentList(Integer page, Integer pageSize) {
        return this.adService.queryCommentList(page,pageSize);
    }
}
